;
; SYSLIB Module Name:  SFCLOS
; Author:  Richard Conn
; SYSLIB Version Number:  2.0
; Module Version Number:  1.0
; Module Entry Points:
;	F$CLOSE
; Module External References:
;	BDOS
;

;
;  F$CLOSE -- CLOSE FILE WHOSE FCB IS PTED TO BY DE
;	RET W/A=0 IF OK
;
	EXT	BDOS

F$CLOSE::
	PUSH	H	; SAVE HL
	PUSH	B	; SAVE BC
	MVI	C,B$CLOS
	CALL	BDOS
	CPI	255	; ERROR?
	JZ	FCLSDN
	XRA	A	; A=0
FCLSDN:
	POP	B	; RESTORE BC
	POP	H	; RESTORE HL
	RET

B$CLOS	EQU	16	; CLOSE FILE

	END
